package zx.tas.model

// 明文
data class CKV2Info(
    val name: String?,
    val createTime: Long?,
    val value: String?,
    val activeTime: Long?,
    val expirationTime: Long?,
    val type: String?,
)
val CKV2Info?.lvVp30: Boolean get() {
    if (this == null || this.type.isNullOrEmpty()) return true // 兼容旧版本
    return type == "imm30" || type == "imm60" || type == "imm90" || type == "imm120"
            || type == "imm150" || type == "imm180" || type == "imm210" || type == "imm240"
            || type == "imm270" || type == "imm300" || type == "imm330" || type == "imm360"
            || type == "imm30o" || type == "imm60o" || type == "imm90o" || type == "imm120o"
            || type == "imm150o" || type == "imm180o" || type == "imm210o" || type == "imm240o"
            || type == "imm270o" || type == "imm300o" || type == "imm330o" || type == "imm360o"
}
//val CKV2Info?.lvVp30RD: Boolean get() {
//    if (this == null) return false
//    return lvVp30 && (createTime ?: Long.MAX_VALUE) < 1748894400000L // 端午节过完前
//}
//val CKV2Info?.lvVp90: Boolean get() {
//    if (this == null || this.type.isNullOrEmpty()) return true // 兼容旧版本
//    return  type == "imm90" || type == "imm120"
//            || type == "imm150" || type == "imm180" || type == "imm210" || type == "imm240"
//            || type == "imm270" || type == "imm300" || type == "imm330" || type == "imm360"
//            || type == "imm90o" || type == "imm120o"
//            || type == "imm150o" || type == "imm180o" || type == "imm210o" || type == "imm240o"
//            || type == "imm270o" || type == "imm300o" || type == "imm330o" || type == "imm360o"
//}

data class CDKEncryptedInfo (
    val deviceId: String,
    val sessionId: String?,
    val startTimestamp: Long,
    val expiredTimestamp: Long,
    val seed: Long,
    // val cdk: String, 这个在c++里面解析即可
)